<?php
/* @var $this MetasController */
/* @var $model Metas */
/* @var $form TbActiveForm */
?>

<div class="form">

	<?php
	$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
		'id' => 'metas-form',
		'enableAjaxValidation' => true,
		'clientOptions' => array('validateOnSubmit' => true,),
	));
	?>


	<?php echo $form->errorSummary($model); ?>

	<?php
//	echo $form->dropDownListControlGroup($model, 'itemType', array('faq' => 'Вопросы и ответы', 'page' => 'Страница'), array('span' => 5, 'empty'=>'--', 'maxlength' => 4,
//		'ajax' => array(
//			'type' => 'POST',
//			'url' => CController::createUrl('metas/getData'),
//			'update' => '#Metas_itemId',
//		),));
	?>
	<?php if ($model->isNewRecord && !isset($_GET['id'])) $this->widget('application.modules.admin.widgets.GetChilds', array('updatedHidden' => 'hidden-id')); ?>

	<?php echo $form->hiddenField($model, 'itemId', array('id' => 'hidden-id', 'value' => (isset($_GET['id']) ? $_GET['id'] : ''))); ?>

	<?php echo $form->textFieldControlGroup($model, 'metaTitle', array('span' => 5, 'maxlength' => 255)); ?>

	<?php echo $form->textAreaControlGroup($model, 'metaDesc', array('span' => 5)); ?>

	<?php echo $form->textFieldControlGroup($model, 'metaKeywords', array('span' => 5, 'maxlength' => 255)); ?>

	<?php echo $form->textFieldControlGroup($model, 'metaRobots', array('span' => 5, 'maxlength' => 255)); ?>

	<?php echo $form->textFieldControlGroup($model, 'metaH1', array('span' => 5, 'maxlength' => 255)); ?>

	<?php echo $form->textFieldControlGroup($model, 'sysHeaders', array('span' => 5)); ?>

	<?php echo $form->textAreaControlGroup($model, 'seoTextShort', array('span' => 8)); ?>

	<?php echo $form->textAreaControlGroup($model, 'seoTextFull', array('span' => 8)); ?>

	<?php echo $form->textFieldControlGroup($model, 'pageGenitive', array('span' => 5)); ?>

	<?php echo $form->textFieldControlGroup($model, 'pageRussianName', array('span' => 5)); ?>

	<div class="form-actions">
		<?php
		echo TbHtml::submitButton($model->isNewRecord ? 'Cоздать' : 'Cохранять', array(
			'color' => TbHtml::BUTTON_COLOR_PRIMARY,
			'size' => TbHtml::BUTTON_SIZE_LARGE,
		));
		?>
	</div>

	<?php $this->endWidget(); ?>

</div><!-- form -->